<!DOCTYPE html>
<!-- 孙中超 2019-7-28 电表结算主页面  -->
<html class="x-admin-sm">

	<head>
		<meta charset="UTF-8">
		<title>电表结算</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="stylesheet" href="./css/font.css">
		<link rel="stylesheet" href="./css/xadmin.css">
		<link rel="stylesheet" href="lib/layui/css/layui.css">
		<link rel="stylesheet" href="command/bootstrap-3.3.7-dist/bootstrap-3.3.7-dist/css/bootstrap.min.css" />
		<link rel="stylesheet" href="command/bootstrap-3.3.7-dist/bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
		<script src="command/bower_components/bootstrap-select/js/bootstrap-select.js"></script>
		<script src="./lib/layui/layui.all.js" charset="utf-8"></script>
		<script type="text/javascript" src="./js/xadmin.js"></script>
		<script src="command/jquery-3.4.1.js"></script>
	</head>

	<body>
		<div class="x-nav">
			<span class="layui-breadcrumb">
				<a href="">首页</a>
				<a href="">财务管理</a>
				<a>
					<cite>电表结算</cite></a>
			</span>
			<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()"
			 title="刷新">
				<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
			</a>
		</div>
		<div class="layui-fluid">
			<div class="layui-row layui-col-space15">
				<div class="layui-col-md12">
					<div class="layui-card">
						<div class="layui-card-body ">
							<form class="layui-form layui-col-space5">
								
								<div class="layui-input-inline layui-show-xs-block">
									<select id ="selRole" name="contrller"style="display: block;width: 160.6px;height: 30px;border-color: #CFCFCF;border-radius: 2px;" >
									</select>
								</div>
								<div class="layui-input-inline layui-show-xs-block">
									<input class="layui-input" placeholder="结算编号" name="start" id="start"></div>
								<div class="layui-input-inline layui-show-xs-block">
									<input class="layui-input" placeholder="核对编号" name="end" id="end"></div>
								<div class="layui-input-inline layui-show-xs-block">
									<button class="layui-btn" lay-submit="" lay-filter="sreach">
										<i class="layui-icon">&#xe615;</i></button>
								</div>
							</form>
						</div>
						<div class="layui-card-header">
							<button class="layui-btn layui-btn-danger" onclick="delAll()">
								<i class="layui-icon"></i>批量删除</button>
							<button class="layui-btn" onclick="xadmin.open('添加','./order-add.html',800,600)">
								<i class="layui-icon"></i>添加</button></div>
						<div class="layui-card-body ">
							<table class="layui-table layui-form"style="width:1299.2px">
								<thead>
									<tr>
										<th style="width: 50px;">结算编号</th>
										<th style="width: 50px;">核对编号</th>
										<th style="width: 80px;">收费编号</th>
										<th style="width: 80px;">费用编号</th>
										<th style="width: 80px;">总金额</th>
										<th style="width: 80px;">实收费用</th>
										<th style="width: 80px;">支付方式</th>
										<th style="width: 20px;">是否开发票</th>
										<th style="width: 80px;">税号</th>
										<th style="width: 80px;">公司全称</th>
										<th style="width: 80px;">联系人</th>
										<th style="width: 80px;">联系电话</th>
										<th style="width: 80px;">创建人</th>
										<th style="width: 80px;">创建时间</th>
										<th style="width: 80px;">更新人</th>
										<th style="width: 80px;">更新时间</th>
										<th style="width: 80px;">编辑</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td style="width: 50px;">bjs1005</td>
										<td style="width: 50px;">10052</td>
										<td style="width: 80px;">1522</td>
										<td style="width: 80px;">208594456</td>
										<td style="width: 80px;">2500</td>
										<td style="width: 80px;">2000</td>
										<td style="width: 80px;">
											<select name="contrller"style="display: block;width:80px;height: 30px;border-color: #CFCFCF;border-radius: 2px;"id="selRol" >
											</select>
											</td>
										<td style="width: 20px;">是</td>
										<td style="width: 80px;">2008230584125665</td>
										<td style="width: 80px;">西悉尼公司</td>
										<td style="width: 80px;">王国</td>
										<td style="width: 80px;">153068791557</td>
										<td style="width: 80px;">王海光</td>
										<td style="width: 80px;">2017-08-17 </td>
										<td style="width: 80px;">苏丹</td>
										<td style="width: 80px;">2018-08-17</td>
										<td class="td-manage" style="width: 80px;">
											<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">
												<i class="layui-icon">&#xe640;</i></a>
										</td>
									</tr>
									<tr>
										<td style="width: 50px;">bjs1005</td>
										<td style="width: 50px;">10052</td>
										<td style="width: 80px;">1522</td>
										<td style="width: 80px;">208594456</td>
										<td style="width: 80px;">2500</td>
										<td style="width: 80px;">2000</td>
										<td style="width: 80px;">
											<div class="layui-input-inline layui-show-xs-block">
												<select name="contrller"style="display: block;width:80px;height: 30px;border-color: #CFCFCF;border-radius: 2px;" >
													<option>支付方式</option>
													<option>支票</option>
													<option>网络</option>
													<option>现金</option>
												</select>
											</div>
										</td>
										<td style="width: 20px;">是</td>
										<td style="width: 80px;">2008230584125665</td>
										<td style="width: 80px;">西悉尼公司</td>
										<td style="width: 80px;">王国</td>
										<td style="width: 80px;">153068791557</td>
										<td style="width: 80px;">王海光</td>
										<td style="width: 80px;">2017-08-17 </td>
										<td style="width: 80px;">苏丹</td>
										<td style="width: 80px;">2018-08-17</td>
										<td class="td-manage" style="width: 80px;">
											<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">
												<i class="layui-icon">&#xe640;</i></a>
										</td>
									</tr>
									<tr>
										<td style="width: 50px;">bjs1005</td>
										<td style="width: 50px;">10052</td>
										<td style="width: 80px;">1522</td>
										<td style="width: 80px;">208594456</td>
										<td style="width: 80px;">2500</td>
										<td style="width: 80px;">2000</td>
										<td style="width: 80px;">
											<div class="layui-input-inline layui-show-xs-block">
												<select name="contrller"style="display: block;width:80px;height: 30px;border-color: #CFCFCF;border-radius: 2px;" >
													<option>支付方式</option>
													<option>支票</option>
													<option>网络</option>
													<option>现金</option>
												</select>
											</div>
										</td>
										<td style="width: 20px;">是</td>
										<td style="width: 80px;">2008230584125665</td>
										<td style="width: 80px;">西悉尼公司</td>
										<td style="width: 80px;">王国</td>
										<td style="width: 80px;">153068791557</td>
										<td style="width: 80px;">王海光</td>
										<td style="width: 80px;">2017-08-17 </td>
										<td style="width: 80px;">苏丹</td>
										<td style="width: 80px;">2018-08-17</td>
										<td class="td-manage" style="width: 80px;">
											<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">
												<i class="layui-icon">&#xe640;</i></a>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="layui-card-body ">
							<div class="page">
								<div>
									<a class="num" href="">首页</a>
									<a class="prev" href="">&lt;&lt;</a>
									<a class="num" href="">1</a>
									<span class="current">2</span>
									<a class="num" href="">3</a>
									<a class="num" href="">...</a>
									<a class="num" href="">489</a>
									<a class="next" href="">&gt;&gt;</a>
									<a class="num" href="">尾页</a></div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</body>
	<script>
		layui.use(['laydate', 'form', 'layer'],
		  layui.use(['laydate','form'], function(){
		  var laydate = layui.laydate;
		  var form = layui.form;
		 form.on('submit(formDemo)', function(data){
layer.msg(JSON.stringify(data.field));
return false;
});
});
}
				/*用户-删除*/
				function member_del(obj, id) {
					layer.confirm('确认要删除吗？',
						function(index) {
							//发异步删除数据
							$(obj).parents("tr").remove();
							layer.msg('已删除!', {
								icon: 1,
								time: 1000
							});
						});
				}

				function delAll(argument) {

					var data = tableCheck.getData();

					layer.confirm('确认要删除吗？' + data,
						function(index) {
							//捉到所有被选中的，发异步进行删除
							layer.msg('删除成功', {
								icon: 1
							});
							$(".layui-form-checked").not('.header').parents('tr').remove();
						});
				}
	</script>
	<script type="text/javascript">
		$(function(){
			getRole();
		});
		function getRole(){
			$('#selRole').empty();
			$.ajax({
				type:"get",
				url:"order.json",
				dataType:"json",
				success:function(data){
					console.log(data);
					if(!data.flag){
						$.each(data,function(index01,value01){
							$('#selRole').append('<option value="'+value01.rid+'">'+value01.rolename+'</option>');
						});
					}
				},
				error:function(data){
					
				}
			});
		}
		
	</script>
	<script type="text/javascript">
	$(function(){
		getRol();
	});
	function getRol(){
		$('#selRol').empty();
		$.ajax({
			type:"get",
			url:"order.json",
			dataType:"json",
			success:function(data){
				console.log(data);
				if(!data.flag){
					$.each(data,function(index01,value01){
						$('#selRol').append('<option value="'+value01.rid+'">'+value01.rolename+'</option>');
					});
				}
			},
			error:function(data){
				
			}
		});
	}
</script>
</html>
